package com.ofek.applicationbase.forms.question;

import java.lang.reflect.Field;

import android.content.Context;

public class TimePickerDialog extends android.app.TimePickerDialog {

	public TimePickerDialog(Context context, int theme,
			OnTimeSetListener callBack, int hourOfDay, int minute,
			boolean is24HourView) {
		super(context, theme, callBack, hourOfDay, minute, is24HourView);
	}
	public TimePickerDialog(Context context,
			OnTimeSetListener callBack, int hourOfDay, int minute,
			boolean is24HourView) {
		this(context, 0, callBack, hourOfDay, minute, is24HourView);
	}
	public void setOnTimeSetListener(OnTimeSetListener mDateSetListener) {
		Field declaredField;
		try {
			declaredField = android.app.TimePickerDialog.class.getDeclaredField("mCallback");
			declaredField.setAccessible(true);
			declaredField.set(this, mDateSetListener);
		} catch(Exception e) {
			throw new RuntimeException("couldnt setOnTimeSetListener");
		}
		
	}
}
